#ifndef _ANONYMOUS_LOG_H
#define _ANONYMOUS_LOG_H

#include <stdarg.h>

#ifdef __cplusplus
extern "C" {
#endif

/*
 * log priority values, in ascending priority order.
 */
typedef enum anonymous_LogPriority {
    ANONYMOUS_LOG_UNKNOWN = 0,
    ANONYMOUS_LOG_DEFAULT,    /* only for SetMinPriority() */
    ANONYMOUS_LOG_VERBOSE,
    ANONYMOUS_LOG_DEBUG,
    ANONYMOUS_LOG_INFO,
    ANONYMOUS_LOG_WARN,
    ANONYMOUS_LOG_ERROR,
    ANONYMOUS_LOG_FATAL,
    ANONYMOUS_LOG_SILENT,     /* only for SetMinPriority(); must be last */
} anonymous_LogPriority;

/*
 * Send a simple string to the log.
 */
int __android_log_write(int prio, const char *tag, const char *text);

/*
 * Send a formatted string to the log, used like printf(fmt,...)
 */
int __android_log_print(int prio, const char *tag,  const char *fmt, ...)
#if defined(__GNUC__)
    __attribute__ ((format(printf, 3, 4)))
#endif
    ;

/*
 * A variant of __android_log_print() that takes a va_list to list
 * additional parameters.
 */
int __android_log_vprint(int prio, const char *tag,
                         const char *fmt, va_list ap);

/*
 * Log an assertion failure and SIGTRAP the process to have a chance
 * to inspect it, if a debugger is attached. This uses the FATAL priority.
 */
void __android_log_assert(const char *cond, const char *tag,
			  const char *fmt, ...)    
#if defined(__GNUC__)
    __attribute__ ((noreturn))
    __attribute__ ((format(printf, 3, 4)))
#endif
    ;

#ifdef __cplusplus
}
#endif

#endif /* _ANONYMOUS_LOG_H */
